#include<bits/stdc++.h>
using namespace std;
const int N=100005;
int a[N];
int n,i,maxn=INT_MIN;
int main(){
freopen("duel.in","r",stdin);
freopen("duel.out","w",stdout);
cin>>n;
for(int i=1;i<=n;i++){
        cin>>a[i];
        maxn=max(maxn,a[i]);
}
sort(a+1,a+1+n);
//for(int i=1;i<=n;i++)cout<<a[i]<<" ";
//cout<<endl;
int xb=n;
for(i=n;i>=1&&xb>=1;i--){
    do{
        xb--;//cout<<"X";
    }while(a[xb]>=a[i]);
    //cout<<"I";
}
cout<<i+1;
return 0;
}
